package org.apache.james.mime4j.field.address;

public class NamedMailbox extends Mailbox
{
  private String name;

  public NamedMailbox(String paramString1, String paramString2, String paramString3)
  {
    super(paramString2, paramString3);
    this.name = paramString1;
  }

  public NamedMailbox(String paramString1, DomainList paramDomainList, String paramString2, String paramString3)
  {
    super(paramDomainList, paramString2, paramString3);
    this.name = paramString1;
  }

  public NamedMailbox(String paramString, Mailbox paramMailbox)
  {
    super(paramMailbox.getRoute(), paramMailbox.getLocalPart(), paramMailbox.getDomain());
    this.name = paramString;
  }

  public String getAddressString(boolean paramBoolean)
  {
    String str;
    StringBuffer localStringBuffer = new StringBuffer();
    if (this.name == null)
      str = "";
    while (true)
    {
      return str + super.getAddressString(paramBoolean);
      str = this.name + " ";
    }
  }

  public String getName()
  {
    return this.name;
  }
}